From: YAMAMOTO Mitsuharu Date: Sat, 22 Jun 2019 02:37:25 +0000 (+0900) Subject: * src/font.c (Ffont_xlfd_name): Don't use strcpy for overlapping strings. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~19^2~2722 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=a0797d32c95948d8b5800c5771026dee3903729c;p=emacs.git * src/font.c (Ffont_xlfd_name): Don't use strcpy for overlapping strings. --- diff --git a/src/font.c b/src/font.c index 992f9e03fea..409ffa6ae0c 100644 --- a/src/font.c +++ b/src/font.c @@ -4360,7 +4360,7 @@ the consecutive wildcards are folded into one. */) while ((p1 = strstr (p0, "-*-*"))) { - strcpy (p1, p1 + 2); + memmove (p1, p1 + 2, (name + namelen + 1) - (p1 + 2)); namelen -= 2; p0 = p1; }